<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="root">
        <h1 v-once>初始化N的值是{{n}}</h1><!--初始化once-->
        <h1>当前N的值是{{n}}</h1>
        <button @click="n++">点我n+1</button>
    </div>
    <script src="../js/vue.js"></script>
    <script>
            Vue.config.productionTip=false//阻止vue启动时产生提示
            new Vue({
                 el: "#root",
                 data:{//数据
                      n:1,

                    },
                 methods:{//方法

                 },
                 computed:{//计算

                 },
                 watch:{//监视

                 }
             })
    </script>
</body>
</html>